class Student2{
    sno:string=''
    sname:string=''
    age:number=0
    major:string=''
    education:string=''
    constructor(sno:string,sname:string,age:number,major:string,eductaion:string){
        this.sno=sno
        this.sname=sname
        this.age=age
        this.major=major
        this.education=eductaion
    }
    introduce(){
        return `学号:${this.sno}\n姓名:${this.sname}\n年龄:${this.age}\n专业:${this.major}\n学历:${this.education}`
    }
}
//实例化并初始化对象
//ts在对进行初始化的过程中建议使用构造函数赋值
let ss1=new Student2("s10001","张飞",23,"武术","小学")